# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: congyiwu <congyiwu AT gmail DOT com>

pkgname=json-c
pkgver=0.12.1
pkgrel=1
pkgdesc='A JSON implementation in C'
url='https://github.com/json-c/json-c/wiki'
license=(MIT)
arch=('i686' 'x86_64')
depends=('glibc')
source=(https://s3.amazonaws.com/${pkgname}_releases/releases/$pkgname-${pkgver}.tar.gz)
sha256sums=('2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123')

build() {
  cd $pkgname-$pkgver
  CFLAGS="$CFLAGS -Wno-error"
  ./configure --prefix=/usr --disable-static
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
